<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>响应式网页布局</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body{
            background: lightpink;
        }
        .container{
            width: 1200px;
            margin: auto;
        }
        .col{
            width: 33.333333%;
            float: left;
            
            /*加一些装饰效果*/
           height: 100px;
            background: lightseagreen;
        }
        
        
        /*响应式代码的结构*/
        @media (max-width:600px) {
            .container{
                width: 100%;
            }
            .col{
                width: 100%;
            }
            body{
                background: lightblue;
            }
        }
            /*清除浮动*/
        .container::after{
            content: "";
            display: table;
            clear: both;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="col">网页的左侧</div>
        <div class="col">网页的中间</div>
        <div class="col">网页的右侧</div>
    </div>
</body>
</html>